﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using CarLeasing.Models;

namespace CarLeasing.Forms
{
    public partial class LoginForm : Form
    {
        public LoginForm()
        {
            InitializeComponent();
        }

        private void Login_Load(object sender, EventArgs e)
        {
            button_Login.Click += (s, _) => OnLogin?.Invoke(textBox_Name.Text, textBox_Password.Text);
            button_Register.Click += (s, _) => OnSwapToRegister?.Invoke();
        }

        public event Action<string,string> OnLogin;
        public event Action OnSwapToRegister;
    }
}
